#ifndef TRAFFICGEN_H_
#define TRAFFICGEN_H_

/* Traffic generator library:
 * 
 * The next functions are usefull to generate traffic in a network.
 * For example, to discover the ip from the router.
 *
 * Ignacio Lopez
 * nacholopez at gmail dot com
 * 
 * License : GPL
 */


/* It send a dhcp request asking for an ip. If there is a dhcp server on the network
 * it should generate traffic from it.
 * Very fast but the network has to have a dhcp server.
 */
int send_dhcp_request(const char *interface);

/* 
 * It sends 255 icmp request to brodcast. Return 0 if everything goes well 
 * I found out that it's not very usefull. At least it's fast to send 255 packages and it could generate
 * some traffic on some networks.
 */
int send_icmp_broadcast_class_C(const char *interface);

/* 
 * It will sends 253 * 254 packets arp requests.
 * the order is 192.168.0.1, 192.168.1.1, 192.168.2.1, .....only incrementing the third octect from the ip.
 * Very timely expensive but effective.
*/
int send_arp_class_C(const char *interface);


/* some of the previous functions take long time to run so it's sensible to wrapper them into threads.
 * if you do it, use the next function to make them stop */
void stop_send_arp_class_C();
void stop_send_icmp_broadcast_class_C();

#endif /*TRAFFICGEN_H_*/
